package com.cmj.commonmodule;

import android.content.Context;
import android.util.AttributeSet;

import in.srain.cube.views.ptr.PtrClassicFrameLayout;

public class CustPtrFramelayout extends PtrClassicFrameLayout {
    public CustPtrFramelayout(Context context) {
        super(context);
        initSetting();
    }


    public CustPtrFramelayout(Context context, AttributeSet attrs) {
        super(context, attrs);
    }

    public CustPtrFramelayout(Context context, AttributeSet attrs, int defStyle) {
        super(context, attrs, defStyle);
    }

    private void initSetting() {
// the following are default settings
        disableWhenHorizontalMove(true);
        setResistance(1.7f);
        setRatioOfHeaderHeightToRefresh(1.2f);
        setDurationToClose(200);
        setDurationToCloseHeader(1000);
// default is false
        setPullToRefresh(false);
// default is true
        setKeepHeaderWhenRefresh(true);
    }
}
